<?php

class Score extends AppModel {
	var $name= 'Score';
	
	//ACL this is a crontrolled object ACO
	var $actsAs = array('Acl' => array('type' => 'controlled'));
	
	function parentNode() {
		if (!$this->id && empty($this->data)) {
			return null;
		}
		if (isset($this->data['Score']['application_id'])) {
			$appId = $this->data['Score']['application_id'];
		} else {
			$appId = $this->field('application_id');
		}
		if (!$appId) {
			return null;
		} else {
			return array('Application' => array('id' => $appId));
		}
	}
	
/**
* START ASSOCIATION INFORMATION
******************************************************************************
*/
 	
 	var $belongsTo = array(
 		'Application' => array(
 			'className' => 'Application',
			'foreignKey' => 'application_id'
		)
	); //end belongsTo array.

}